/*
 * TitleBar.h
 *
 *  Created on: 2011-1-12
 *      Author: Administrator
 */

#ifndef TITLEBAR_H_
#define TITLEBAR_H_

#include "BaseControl.h"

class CTitleBar : public CBaseControl
	{
public:
	static CTitleBar* NewL( const TRect& aRect, const CCoeControl* aParent );
	static CTitleBar* NewLC( const TRect& aRect,const CCoeControl* aParent );
	virtual ~CTitleBar();
	
public:
	void Draw(CWindowGc& gc, const TRect& aRect) const;
	void HandlePointerEventL(const TPointerEvent& aPointerEvent);
	void SetLayout();
	void setMargin(TInt aGap);
	void setButtonTextL(const TDesC& aText,TInt aActionType);
	TInt ActionType();
	void setLogoL(CImage* aLogo);
	void setButtonImgL(CImage* aImg);
protected:
	CTitleBar();
	void ConstructL(const TRect& aRect,const CCoeControl* aParent);
	
private:
	HBufC* iButtonText;
	TInt iMargin;
	TRect iButtonRect;
	TInt iActionType;
	CImage* iLogo;
	CImage* iButtonImg;
	};

#endif /* TITLEBAR_H_ */
